import server from '@/utils/fetch'
// 提现记录
export const carryHistory = () => {
    return server.get('/v1/purchasehistory', {
        params: {
            otype: 1,
            $sort: JSON.stringify({ createtime: '-1' }),
            userid: localStorage.getItem('doctor_id')
        }
    })
}
// 会诊记录
export const groupHistory = () => {
    const status = 2;
    const $sort = JSON.stringify({ createtime: '-1' });
    const doctorid = localStorage.getItem('doctor_id')
    return server.get(`/v1/inquiry?status=${status}&$sort=${$sort}&doctorid=${doctorid}`)
}
// 提现
export const carry = (money) => {
    const doctorid = localStorage.getItem('doctor_id')
    return server.put(`/v1/purchasehistory/${doctorid}`, { money: parseInt(money) * 100 })
}

